<?php
class Pagination extends CI_Model{
	public function __construct(){
		parent::__construct();
		$this->load->database();
	}
	
	public function getNums(){
		$query = $this->db->get('users');
		return $query->num_rows();
		
	}
	
	public function keyPaging($num_record,$start){
		$this->db->select('id,name,age');
// 		$this->db->order_by('id');
		$this->db->limit($num_record,$start);
		$query = $this->db->get('users');
		return $query->result_array();
	}
	
}